Helpful Information
 
 
Category: vBulletin 4 Discussion
Need help whith a plugin [vB3.8 > vB4]

Hello, long time to create a plugin for my users to add a code in the title (+ pv) deprived his subjects could do if they wanted visitors.

Hook Location: showthread_postbit_create

if(stristr($thread[title], '+pv') == TRUE)
{
$onlyreg = TRUE;
}

and in my showthread after $navbar:

<if condition="($onlyreg == TRUE) and ($bbuserinfo[posts]<=1)">
<center><h2>Thread Visible for Registered Users Only</h2></center>
<else />

and below $footer:

</if>

but doesn´t work in vB4. :(

You need to preregister $onlyreg for use in that template after you define it.

vB_Template::preRegister('SHOWTHREAD', array('onlyreg' => $onlyreg));

Thanks Lynne, Can you outline the steps to follow? :erm:

I did. Add that line after you defined the variable.










privacy (GDPR)